using UnityEngine;

public class TitanTutor : MonoBehaviour
{
	private const int COUNT_SHOW_ARROW_BY_FULL_BAR = 2;

	private const string KEY_SHOW_ARROW_BY_FULL_BAR = "showArrowByFullBar";

	private const float SECOND_SHOW_ARROW_BY_FULL_BAR = 5f;

	private const int COUNT_SHOW_ARROW_AND_TEXT_BY_START_TITANFALL = 2;

	private const string KEY_SHOW_ARROW_AND_TEXT_BY_START_TITANFALL = "showArrowAndTextByStartTitanfall";

	private const float SECOND_SHOW_ARROW_AND_TEXT_BY_START_TITANFALL = 5f;

	private static TitanTutor _instance;

	public static TitanTutor instance
	{
		get
		{
			if (_instance == null)
			{
				_instance = new TitanTutor();
			}
			return _instance;
		}
	}

	private TitanTutor()
	{
	}

	public void ShowArrowByFullBar()
	{
		int @int = PlayerPrefs.GetInt("showArrowByFullBar");
		if (@int >= 2)
		{
			return;
		}
		PlayerPrefs.SetInt("showArrowByFullBar", @int + 1);
		TitanfallUI.instance.tutorArrow.SetActive(true);
		CoroutineRunner.Invoke(5f, delegate
		{
			if (TitanfallUI.instance != null && TitanfallUI.instance.tutorArrow != null)
			{
				TitanfallUI.instance.tutorArrow.SetActive(false);
			}
		});
	}

	public void ShowArrowAndTextByStartTitanfall()
	{
		int @int = PlayerPrefs.GetInt("showArrowAndTextByStartTitanfall");
		if (@int >= 2)
		{
			return;
		}
		PlayerPrefs.SetInt("showArrowAndTextByStartTitanfall", @int + 1);
		TitanfallUI.instance.tutorArrow.SetActive(true);
		TitanfallUI.instance.tutorText.SetActive(true);
		CoroutineRunner.Invoke(5f, delegate
		{
			if ((bool)TitanfallUI.instance)
			{
				TitanfallUI.instance.tutorArrow.SetActive(false);
				TitanfallUI.instance.tutorText.SetActive(false);
			}
		});
	}
}
